import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';

@Injectable({
  providedIn: 'root'
})
export class CloudService {

  apiBase = "http://localhost:9000";

  constructor(private http: HttpClient) { }

  /**
   * gateway lb动态路由
   * */
  gateway_lb(){
    const url = this.apiBase + "/gateway/user/info/findUserInfoByUsername?username=zs";
    return this.http.get<[Object]>(url);
  }

  /**
   * gateway 固定路径
   * */
  gateway_http(){
    const url = this.apiBase + "/gateway/camunda/task/list/zhangsan";
    return this.http.get<[Object]>(url);
  }
}
